package com.six.goods.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.six.core.entity.Shop;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* @author wang
* @description 针对表【sto_shop】的数据库操作Mapper
* @createDate 2023-02-27 13:50:47
* @Entity com.six.core.entity.Shop
*/
@Repository
public interface ShopMapper extends BaseMapper<Shop> {
    @Select("select * from sto_shop")
    List<Shop> selectList();

    //根据userID查询他的店铺id
    @Select("SELECT s.id FROM tb_user t join sto_shop s  on t.userid=s.userid where t.userid=#{userid}")
    Integer selectShopidByUserid(Integer userid);
}




